﻿CREATE TABLE [dbo].[Apps] (
    [Id]              UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
    [Name]            NVARCHAR (50)    NOT NULL,
    [Description]     NVARCHAR (10)    NULL,
    [AppSecret]       NVARCHAR (24)    NOT NULL,
    [Icon]            NVARCHAR (255)   NULL,
    [Uri]             NVARCHAR (255)   NULL,
    [IsEnabled]       BIT              DEFAULT ((0)) NOT NULL,
    [PermissionLevel] INT              DEFAULT ((3)) NOT NULL,
    [CreatedBy]       UNIQUEIDENTIFIER NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Apps_0] FOREIGN KEY ([CreatedBy]) REFERENCES [dbo].[UsersAuthentication] ([Id])
);

